Code
I'm a rather prolific coder. I can't help it. There is something about analysing a problem, exploring its edges and producing a set of tools that best manage that problem that I find totally intoxicating. Unfortunately there is very rarely one best way of managing a problem and I often find that a few small changes in requirements can sometimes lead me to find a totally different solution to the same problem. This is fine for me, I love coding, but it does means you should use my code at your own risk because the probablitly I'll move on to something different fairly quickly is rather large. Anyway, here is a list of some of the code I've written recently:
Currently maintained Python modules:
- authtkt
- barenecessities
- cgipack
- commandtool
- configconvert
- contactform
- conversionkit
- database
- domain
- dreamweavertemplate
- errordocument
- errorreport
- flashmessage
- flows
- formbuild
- formconvert
- gallery
- gradwelllibs
- httpkit
- nestedrecord
- permissionkit
- powerpack
- psycopg2database
- pylonspack
- recordconvert
- sitetool
- sqlite3database
- stringconvert
- urlconvert
- usermanager
- wizard
- wsgipack
ToDo:
- PowerPack - adaptors for running Pylons applications on Flows
Archived Projects
- GradwellLibs - A series of modules I need for maintaining some legacy CGI sites (which incidentally run on Flows now).
- SiteTool - used to manage this site amongst others
- -
- RecordConvert - Tools for converting data structures that would work well with relational databases
- -
- StringConvert - convert strings to Unicode, integers, floats, dates etc
- NestedRecord - handle complex nested structures of records as flat key value pairs by encoding the key
- -
- -
- Mail - simple wrapper around the Python email module
Phasing out of my own projects:
- Pylons - I'm using Flows (which I absolutely love) instead. It corrects all the problems with WSGI and Pylons which I discovered when writing the Pylons Book and is a complete re-write of the whole codebase and core dependencies from scratch, with complete conceptual integrity and with a far more modular architecture than even Pylons. A flows application adapts itself on each requests so that only the services you need (eg database, templating) are loaded on each request. If you don't need 'em they aren't loaded. The same code style you use for web requests is also used in cron jobs, scripts etc, and there are no threadlocals, stacked object proxies or any of that nonsense. The whole thing is really simple and elegant. If enough people want to be involved in a Flows community I'll happily release it all properly, otherwise I'll keep it to myself and people can stick with Pylons.
- FormBuild 1 and 2 - use FormBuild 3 instead.
- AuthKit - I'm using the separate UserManager, PermissionKit and AuthTkt code instead.
Older/More Established Projects
I've been coding for quite a long time so here are some of my older/more established projects, some are very well-known, others I'm probably the only user:
Name | Status | Site | Dates | Description |
---|---|---|---|---|
lemon | Superceeded by the Python Web Modules | http://lemon.sourceforge.net/ | 2002-2003 | The result of my first serious forray into Python after having done mainly done my web coding with Perl CGI scripts. I decided that I wanted to build a series of web start-ups and that the best way to do that was to first build a set of awesome web tools. I'm not sure that was the correct approach and this first attempt certainly wasn't awesome but some of the later work arguably is. |
web, engine, model, snakesql, database, serve, pigeon | Unmaintained but still used in some places online | http://pythonweb.org | 2002-2005 | A set of modules collectively know as the Python Web Modules. Started out as a fork and refactoring of lemon aimed at the average Python web developer who didn't fancy using Zope or one of the other frameworks. |
Pylons | Actively maintained with a large, vocal and happy community | |||
Deploying a Python Package
These are the steps I try to go through when deploying a new version of a package.
-
Check the version number is correct in all the following places:
- setup.py
- doc/source/conf.py
- doc/source/index.rst (in the title and in the download links)
- Make sure the change log is up to date and matches the version you are deploying
- Run the doc tests and make sure everything passes
- Run ~/env/bin/python setup.py sdist bdist_egg to create the sdist and egg versions
- Create an empty virtual Python environment and test that egg you've just created installs correctly: cd dist && python ~/Desktop/Cur/virtualenv.py env && env/bin/easy_install *.tar.gz
- Extract the source distribution and ensure the tests can be run: tar zxfv *.tar.gz && cd */test && ../../env/bin/python doc.py
- Run make html in the doc directory to build the HTML, copy it to the live site and run due update -TCLDr -s . -S work/code/ to update the templates. Check all the information is correct and as you want it to be
- Run ~/env/bin/python setup.py sdist bdist_egg register upload to put it live on PyPi